The Gotthard Base Tunnel is the world's longest transit tunnel, excluding urban metro lines (which have intermediate stations).
The world's longest transit tunnel is a metro line in Guangzhou, China. It's 37.5 miles (60.4 km) long – about 2 miles (3.3 km) longer than the Gotthard Base.
The UK's longest railway tunnel is on the Northern Line of the London Underground. This is 17.3 miles (27.8 km) long.
Note that the Northern Line is not the longest line on the London Underground. That honour goes to the Central Line, which is 47 miles long. But most of it's above ground.
A transit tunnel is one that carries traffic. In other words, water supply tunnels (etc.) are excluded.
© Haydn Thompson 2017